<template>
  <div id="home">
    <img class="navigation_bar" src="./images/navigation_bar.png" alt="" />

    <h1 class="title">RA SCHOOL</h1>
    <h3 class="title_list">course survey and lucky draw</h3>

    <div id="SOEID_box">
      <h4 class="SOEID_title">Please enter your SOEID</h4>

      <van-field v-model="SOEID" />

      <p class="btn">
        <van-button type="default" size="small" round @click="onENTER">
          ENTER
        </van-button>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'home',
  components: {},
  props: {},
  data () {
    return {
      SOEID: ''
    }
  },
  computed: {},
  watch: {},
  created () { },
  mounted () { },
  methods: {
    // 点击开始按钮
    onENTER () {
      if (this.SOEID === '') {
        this.$toast({ message: '请输入SOEID', position: 'top', duration: 900 })
        return
      }
      this.$store.commit('changeSOEID', this.SOEID)
      this.$router.push('/form')
    }
  }
}
</script>

<style lang='less' scoped>
#home {
  width: 100vw;
  overflow-x: hidden;
  .navigation_bar {
    width: 100vw;
  }
  .title {
    color: #056dae;
    text-align: center;
    font-size: 30px;
    font-weight: 900;
    margin-top: 90px;
  }
  .title_list {
    color: #056dae;
    text-align: center;
    font-size: 19px;
    margin-top: 15px;
    font-weight: 600;
  }
  // SOEID 盒子
  #SOEID_box {
    width: 85%;
    border-radius: 5px;
    background: #056dae;
    margin: auto;
    margin-top: 50px;
    padding: 22px;
    box-sizing: border-box;
    .SOEID_title {
      color: #fff;
      text-align: center;
      font-weight: 500;
      font-size: 14px;
    }
    .van-field {
      margin-top: 15px;
      border-radius: 5px;
    }
    .btn {
      text-align: center;
      .van-button {
        width: 144px;
        margin-top: 24px;
        background: transparent;
        .van-button__text {
          color: #fff;
          font-size: 18px;
        }
      }
    }
  }
}
</style>
